package com.vrv.vap.baseline.service.impl;

import com.vrv.vap.baseline.config.ExcelTemplateConfig;
import com.vrv.vap.baseline.entity.BaseDictAll;
import com.vrv.vap.baseline.mapper.BaseDictAllMapper;
import com.vrv.vap.baseline.service.AbstractExcelExportService;
import com.vrv.vap.baseline.util.FileOperationUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.IOException;
import java.util.List;

@Service
public class BaseDictAllExportService extends AbstractExcelExportService<BaseDictAll> {
    public static final String DICT = "base_dict_all";
    @Autowired
    private BaseDictAllMapper baseDictAllMapper;

    public BaseDictAllExportService(FileOperationUtil fileOperationUtil, ExcelTemplateConfig excelTemplateConfig) {
        super(fileOperationUtil, excelTemplateConfig, DICT);
    }

    @Override
    protected List<BaseDictAll> getAllData() {
        return baseDictAllMapper.selectAll();
    }

    @Override
    protected void processData(List<BaseDictAll> dataList, String format) throws IOException {
        // 如果需要对数据进行额外处理，可以在这里实现
    }

    @Override
    protected Class<BaseDictAll> getEntityClass() {
        return BaseDictAll.class;
    }
}